// 导入路由模块
import { createBrowserRouter } from "react-router";
// 导入组件
import Layout from '../pages/Layout/index.tsx'
import New from '../pages/New/index.tsx'
import Month from '../pages/Month/index.tsx'
import Year from '../pages/Year/index.tsx'


// 创建路由模块
const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout />,
    children:[
      {
        index:true,
        element:<Month />
      },
      {
        path:'year',
        element:<Year />
      }
    ]
  },
  {
    path:'/new',
    element:<New />
  }
]);

export default router;
